<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>后台管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	 <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="UI/admins/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="UI/admins/css/main.css"/>
    <script type="text/javascript" src="UI/admins/js/libs/modernizr.min.js"></script>
	
  </head>
  
  <body>

    <!--/sidebar-->

        <div class="crumb-wrap">

            <div class="crumb-list"><i class="icon-font"></i>首页<span class="crumb-step">&gt;</span><a class="crumb-name" href="listAllmachine">自助终端管理</a><span class="crumb-step">&gt;</span><span>自助终端修改</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
            	<s:form action="editMachine" method="post">
            	<s:hidden name="machine.id"></s:hidden>
            	<s:hidden name="machine.joinTime"></s:hidden>
            	<s:hidden name="machine.machineaddress.id"></s:hidden>
                    <table class="insert-tab" width="100%">
                        <tbody>
                        	<tr>
                                <th width="120"><i class="require-red">*</i>编号：</th>
                                <td>
                                	<s:property value="machine.id"/>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>终端地址：</th>
                                <td>
                                    <s:textfield name="machine.ipAddress"  class="common-text required" ></s:textfield>
                                </td>
                            </tr>
							<tr>
                                <th><i class="require-red">*</i>所属片区：</th>
                                <td>
                                	<s:select name="machine.machineaddress.machineaddress.id" list="listmachineaddress" listKey="id" listValue="name"></s:select>
                                	<s:textfield name="machine.machineaddress.name"  class="common-text required"></s:textfield>
                                	
                                </td>
                                	
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>加入时间：</th>
                                <td>
                                	<s:date name="machine.joinTime"  />
                                </td>
                                	
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>片区负责人：</th>
                                <td>
									<s:select name="machine.admin.id" list="listadmin" listKey="id" listValue="name"></s:select>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>格子总数：</th>
                                <td>
                                	<s:textfield name="machine.numAll"  class="common-text required" ></s:textfield>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>格子使用数：</th>
                                <td>
                                	<s:textfield name="machine.numUsed"  class="common-text required" ></s:textfield>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>格子维修数：</th>
                                <td>
                                	<s:textfield name="machine.numRepair"  class="common-text required" ></s:textfield>
                                </td>
                            </tr>
                            <tr>
                                <th><i class="require-red">*</i>状态：</th>
                                <td>
                                <s:if test="machine.state==1">
                                	<input  type="radio" name="state" value="1"  checked="checked"></input>运行
                                	<input  type="radio" name="state" value="2"  ></input>故障
                                	<input  type="radio" name="state" value="3"  ></input>维修
                                	<input  type="radio" name="state" value="4"  ></input>离线
                                	<input  type="radio" name="state" value="5"  ></input>删除
                                </s:if>
                                <s:elseif test="machine.state==2">
                                	<input  type="radio" name="state" value="1"  ></input>运行
                                	<input  type="radio" name="state" value="2"  checked="checked"></input>故障
                                	<input  type="radio" name="state" value="3"  ></input>维修
                                	<input  type="radio" name="state" value="4"  ></input>离线
                                	<input  type="radio" name="state" value="5"  ></input>删除
                                </s:elseif>
                                <s:elseif test="machine.state==3">
                                	<input  type="radio" name="state" value="1"  ></input>运行
                                	<input  type="radio" name="state" value="2"  ></input>故障
                                	<input  type="radio" name="state" value="3"  checked="checked"></input>维修
                                	<input  type="radio" name="state" value="4"  ></input>离线
                                	<input  type="radio" name="state" value="5"  ></input>删除
                                </s:elseif>
                                <s:elseif test="machine.state==4">
                                	<input  type="radio" name="state" value="1"  ></input>运行
                                	<input  type="radio" name="state" value="2"  ></input>故障
                                	<input  type="radio" name="state" value="3"  ></input>维修
                                	<input  type="radio" name="state" value="4"  checked="checked"></input>离线
                                	<input  type="radio" name="state" value="5"  ></input>删除
                                </s:elseif>
                                <s:elseif test="machine.state==5">
                                	<input  type="radio" name="state" value="1"  ></input>运行
                                	<input  type="radio" name="state" value="2"  ></input>故障
                                	<input  type="radio" name="state" value="3"  ></input>维修
                                	<input  type="radio" name="state" value="4"  ></input>离线
                                	<input  type="radio" name="state" value="5"  checked="checked"></input>删除
                                </s:elseif>
                                </td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>

                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </s:form>
            </div>
        </div>

    <!--/main-->

  </body>
</html>
